<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class GroupClass extends Model
{
    //套餐表
    protected $table = 'group_class';

    //关联详情
    public function group_class_info()
    {
        return $this->hasMany(GroupClassInfo::class, 'group_class_id', 'id');
    }

    //关联门店
    public function store()
    {
        return $this->hasOne(Store::class,'id','store_id');
    }

    public function getCoveImgAttribute($value)
    {
        return getDomain() . '/' . $value;
    }
}
